how to add 2 dates in python

41

import datetime
date = datetime.date(2012, 2, 12)
time = datetime.time(1, 30)
combined = datetime.datetime.combine(date, time)
date_1 = datetime.datetime.strptime(start_date, "%m/%d/%y")

end_date = date_1 + datetime.timedelta(days=10)

Comments

Submit
0 Comments